package com.cyh.ebpttoolswar.entitys;

public class SsmConfig extends Config {
  private String TEMPTEMPLATEPath = "/com/tnzt/config/freemarker/ssm/";
  private String tableName;
  private String defaultPackageName; // 默认包名

  private String daoName = "Dao"; // dao名称
  private String formName = "Form"; // 表单名称
  private String mapperName = "Dao"; // mapper名称
  private String serviceName = "Service"; // service名称
  private String actionName = "Action"; // Action名称
  private String apiName = "ApiAction"; // api名称
  private String apiUserName = "ApiUserAction"; // apiUser名称

  private String defaultEntityPackageName = ".entity"; // dao路径
  private String defaultDaoPackageName = ".dao"; // dao路径
  private String defaultServicePackageName = ".service"; // service路径
  private String defaultMapperPackageName = ".mapper"; // mapper路径
  private String defaultActionPackageName = ".action"; // 控制器路径
  private String defaultFormPackageName = ".form"; // 表单路径
  private String defaultApiActionPackageName = ".action.api"; // api控制器路径
  private String defaultApiUserActionPackageName = ".action.api.user"; // apiUser控制器路径

  public SsmConfig() {
    super.setTemplatePath(TEMPTEMPLATEPath);
  }

  public String getTableName() {
    return tableName;
  }

  public void setTableName(String tableName) {
    this.tableName = tableName;
  }

  public void setDefault() {
    setDefaultPackageName(defaultPackageName);
    setEntityPackageName(defaultPackageName + getDefaultEntityPackageName());
    setDaoPackageName(defaultPackageName + getDefaultDaoPackageName());
    setServicePackageName(defaultPackageName + getDefaultServicePackageName());
    setMapperPackageName(defaultPackageName + getDefaultMapperPackageName());
    setActionPackageName(defaultPackageName + getDefaultActionPackageName());
    setFormPackageName(defaultPackageName + getDefaultFormPackageName());

    super.setDaoName(daoName);

    super.setFormName(formName);
    super.setMapperName(mapperName);
    super.setServiceName(serviceName);
    super.setActionName(actionName);
  }

  public String getTEMPTEMPLATEPath() {
    return TEMPTEMPLATEPath;
  }

  public void setTEMPTEMPLATEPath(String TEMPTEMPLATEPath) {
    this.TEMPTEMPLATEPath = TEMPTEMPLATEPath;
  }

  @Override
  public String getDefaultPackageName() {
    return defaultPackageName;
  }

  @Override
  public void setDefaultPackageName(String defaultPackageName) {
    this.defaultPackageName = defaultPackageName;
  }

  @Override
  public String getDaoName() {
    return daoName;
  }

  @Override
  public void setDaoName(String daoName) {
    this.daoName = daoName;
  }

  @Override
  public String getFormName() {
    return formName;
  }

  @Override
  public void setFormName(String formName) {
    this.formName = formName;
  }

  @Override
  public String getMapperName() {
    return mapperName;
  }

  @Override
  public void setMapperName(String mapperName) {
    this.mapperName = mapperName;
  }

  @Override
  public String getServiceName() {
    return serviceName;
  }

  @Override
  public void setServiceName(String serviceName) {
    this.serviceName = serviceName;
  }

  @Override
  public String getActionName() {
    return actionName;
  }

  @Override
  public void setActionName(String actionName) {
    this.actionName = actionName;
  }

  @Override
  public String getApiName() {
    return apiName;
  }

  @Override
  public void setApiName(String apiName) {
    this.apiName = apiName;
  }

  @Override
  public String getApiUserName() {
    return apiUserName;
  }

  @Override
  public void setApiUserName(String apiUserName) {
    this.apiUserName = apiUserName;
  }

  @Override
  public String getDefaultEntityPackageName() {
    return defaultEntityPackageName;
  }

  @Override
  public void setDefaultEntityPackageName(String defaultEntityPackageName) {
    this.defaultEntityPackageName = defaultEntityPackageName;
  }

  @Override
  public String getDefaultDaoPackageName() {
    return defaultDaoPackageName;
  }

  @Override
  public void setDefaultDaoPackageName(String defaultDaoPackageName) {
    this.defaultDaoPackageName = defaultDaoPackageName;
  }

  @Override
  public String getDefaultServicePackageName() {
    return defaultServicePackageName;
  }

  @Override
  public void setDefaultServicePackageName(String defaultServicePackageName) {
    this.defaultServicePackageName = defaultServicePackageName;
  }

  @Override
  public String getDefaultMapperPackageName() {
    return defaultMapperPackageName;
  }

  @Override
  public void setDefaultMapperPackageName(String defaultMapperPackageName) {
    this.defaultMapperPackageName = defaultMapperPackageName;
  }

  @Override
  public String getDefaultActionPackageName() {
    return defaultActionPackageName;
  }

  @Override
  public void setDefaultActionPackageName(String defaultActionPackageName) {
    this.defaultActionPackageName = defaultActionPackageName;
  }

  @Override
  public String getDefaultFormPackageName() {
    return defaultFormPackageName;
  }

  @Override
  public void setDefaultFormPackageName(String defaultFormPackageName) {
    this.defaultFormPackageName = defaultFormPackageName;
  }

  public String getDefaultApiActionPackageName() {
    return defaultApiActionPackageName;
  }

  public void setDefaultApiActionPackageName(String defaultApiActionPackageName) {
    this.defaultApiActionPackageName = defaultApiActionPackageName;
  }

  public String getDefaultApiUserActionPackageName() {
    return defaultApiUserActionPackageName;
  }

  public void setDefaultApiUserActionPackageName(String defaultApiUserActionPackageName) {
    this.defaultApiUserActionPackageName = defaultApiUserActionPackageName;
  }
}
